angular.module('furion.controllers.modal', [])

.controller 'QrcodeCtrl', ($scope,$rootScope) ->
  $scope.goBack = ()->
      $rootScope.goBack()
      $scope.$emit("closeShare")
    $scope.$on '$modal.enter', ()->
      $('#qrcode-container').qrcode
        text: $scope.modal_params.qrcode_text
      return

    return
.controller 'signoutConfirmCtrl', ($scope,$rootScope) ->
  $scope.goBack = ()->
      $rootScope.goBack()
  $scope.signOut = ()->
    $scope.goBack()
    $scope.$emit("Signout")
  return

.controller 'TouchidModalCtrl', () ->
  return

.controller 'ImageModalCtrl', ($scope, $stateParams)->
  $scope.img_urls = null

  $scope.modal_shown = ()->
    $scope.img_url = $scope.modal_params.url

  $scope.closeModal = ()->
    $scope.$emit("modals:close", {modal_name: 'image_modal'})

  return

.controller 'EditCtrl', ($scope, $stateParams)->
